package com.chengxiaoxiao.web.servlet;

import com.chengxiaoxiao.utils.QuartzUtils;
import org.quartz.SchedulerException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


public class AutoServlet extends HttpServlet {

    @Override
    public void init() throws ServletException {

        try {
            QuartzUtils.schedulerJob();

        } catch (SchedulerException e) {
            e.printStackTrace();
        }
    }

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
